import request from '@/utils/request'
// -------- 贷款需求 --------
let BASE_ADDRESS = '/tool/loanNeeds'

// 分页查询  /tool/loanNeeds/list
export const getLoanNeedsListApi = () =>{
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
    })
}

// 添加一条需求  /tool/loanNeeds/add
export const getLoanNeedsAddApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 修改需求 /tool/loanNeeds/edit
export const getLoanNeedsEditApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}

// 删除需求 /tool/loanNeeds/remove/{id}
export const getLoanNeedsRemoveApi = (id) =>{
    return request({
        url: `${BASE_ADDRESS}/remove/${id}`,
        method: "delete",
    })
}